<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>JSDoc: Class: OnePassSignaturePacket</title>

    <script src="scripts/prettify/prettify.js"> </script>
    <script src="scripts/prettify/lang-css.js"> </script>
    <!--[if lt IE 9]>
      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
    <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>

<body>

<div id="main">

    <h1 class="page-title">Class: OnePassSignaturePacket</h1>

    




<section>

<header>
    
        <h2><span class="attribs"><span class="type-signature"></span></span>OnePassSignaturePacket<span class="signature">()</span><span class="type-signature"></span></h2>
        
            <div class="class-description"><p>Implementation of the One-Pass Signature Packets (Tag 4)</p>
<p><a href="https://tools.ietf.org/html/rfc4880#section-5.4">RFC4880 5.4</a>:
The One-Pass Signature packet precedes the signed data and contains
enough information to allow the receiver to begin calculating any
hashes needed to verify the signature.  It allows the Signature
packet to be placed at the end of the message, so that the signer
can compute the entire signed message in one pass.</p></div>
        
    
</header>

<article>
    <div class="container-overview">
    
        

    
    <h2>Constructor</h2>
    

    
    <h4 class="name" id="OnePassSignaturePacket"><span class="type-signature"></span>new OnePassSignaturePacket<span class="signature">()</span><span class="type-signature"></span></h4>
    

    















<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="https://github.com/openpgpjs/openpgpjs/blob/v6.2.2/src/packet/one_pass_signature.js">packet/one_pass_signature.js</a>, <a href="https://github.com/openpgpjs/openpgpjs/blob/v6.2.2/src/packet/one_pass_signature.js#L37">line 37</a>
    </li></ul></dd>
    

    

    

    
</dl>




















    
    </div>

    

    

    

    

    

    

    
        <h3 class="subsection-title">Members</h3>

        
            
<h4 class="name" id="flags"><span class="type-signature"></span>flags<span class="type-signature"></span></h4>




<div class="description">
    <p>A one-octet number holding a flag showing whether the signature is nested.
A zero value indicates that the next packet is another One-Pass Signature packet
that describes another signature to be applied to the same message data.</p>
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="https://github.com/openpgpjs/openpgpjs/blob/v6.2.2/src/packet/one_pass_signature.js">packet/one_pass_signature.js</a>, <a href="https://github.com/openpgpjs/openpgpjs/blob/v6.2.2/src/packet/one_pass_signature.js#L90">line 90</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
            
<h4 class="name" id="hashAlgorithm"><span class="type-signature"></span>hashAlgorithm<span class="type-signature"> :enums.hash</span></h4>




<div class="description">
    <p>A one-octet number describing the hash algorithm used.</p>
</div>



    <h5>Type:</h5>
    <ul>
        <li>
            
<span class="param-type">enums.hash</span>


        </li>
    </ul>





<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="https://github.com/openpgpjs/openpgpjs/blob/v6.2.2/src/packet/one_pass_signature.js">packet/one_pass_signature.js</a>, <a href="https://github.com/openpgpjs/openpgpjs/blob/v6.2.2/src/packet/one_pass_signature.js#L72">line 72</a>
    </li></ul></dd>
    

    

    
    <dt class="tag-see">See:</dt>
    <dd class="tag-see">
        <ul>
            <li><a href="https://tools.ietf.org/html/rfc4880#section-9.4">RFC4880 9.4</a></li>
        </ul>
    </dd>
    

    
</dl>






        
            
<h4 class="name" id="issuerFingerprint"><span class="type-signature"></span>issuerFingerprint<span class="type-signature"></span></h4>




<div class="description">
    <p>Only for v6 packets, 32 octets of the fingerprint of the signing key.</p>
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="https://github.com/openpgpjs/openpgpjs/blob/v6.2.2/src/packet/one_pass_signature.js">packet/one_pass_signature.js</a>, <a href="https://github.com/openpgpjs/openpgpjs/blob/v6.2.2/src/packet/one_pass_signature.js#L84">line 84</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
            
<h4 class="name" id="issuerKeyID"><span class="type-signature"></span>issuerKeyID<span class="type-signature"></span></h4>




<div class="description">
    <p>Only for v3 packets, an eight-octet number holding the Key ID of the signing key.</p>
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="https://github.com/openpgpjs/openpgpjs/blob/v6.2.2/src/packet/one_pass_signature.js">packet/one_pass_signature.js</a>, <a href="https://github.com/openpgpjs/openpgpjs/blob/v6.2.2/src/packet/one_pass_signature.js#L82">line 82</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
            
<h4 class="name" id="publicKeyAlgorithm"><span class="type-signature"></span>publicKeyAlgorithm<span class="type-signature"> :enums.publicKey</span></h4>




<div class="description">
    <p>A one-octet number describing the public-key algorithm used.</p>
</div>



    <h5>Type:</h5>
    <ul>
        <li>
            
<span class="param-type">enums.publicKey</span>


        </li>
    </ul>





<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="https://github.com/openpgpjs/openpgpjs/blob/v6.2.2/src/packet/one_pass_signature.js">packet/one_pass_signature.js</a>, <a href="https://github.com/openpgpjs/openpgpjs/blob/v6.2.2/src/packet/one_pass_signature.js#L78">line 78</a>
    </li></ul></dd>
    

    

    
    <dt class="tag-see">See:</dt>
    <dd class="tag-see">
        <ul>
            <li><a href="https://tools.ietf.org/html/rfc4880#section-9.1">RFC4880 9.1</a></li>
        </ul>
    </dd>
    

    
</dl>






        
            
<h4 class="name" id="salt"><span class="type-signature"></span>salt<span class="type-signature"></span></h4>




<div class="description">
    <p>Only for v6, a variable-length field containing the salt.</p>
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="https://github.com/openpgpjs/openpgpjs/blob/v6.2.2/src/packet/one_pass_signature.js">packet/one_pass_signature.js</a>, <a href="https://github.com/openpgpjs/openpgpjs/blob/v6.2.2/src/packet/one_pass_signature.js#L80">line 80</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
            
<h4 class="name" id="signatureType"><span class="type-signature"></span>signatureType<span class="type-signature"> :enums.signature</span></h4>




<div class="description">
    <p>A one-octet signature type.
Signature types are described in
<a href="https://tools.ietf.org/html/rfc4880#section-5.2.1">RFC4880 Section 5.2.1</a>.</p>
</div>



    <h5>Type:</h5>
    <ul>
        <li>
            
<span class="param-type">enums.signature</span>


        </li>
    </ul>





<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="https://github.com/openpgpjs/openpgpjs/blob/v6.2.2/src/packet/one_pass_signature.js">packet/one_pass_signature.js</a>, <a href="https://github.com/openpgpjs/openpgpjs/blob/v6.2.2/src/packet/one_pass_signature.js#L66">line 66</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
            
<h4 class="name" id="version"><span class="type-signature"></span>version<span class="type-signature"></span></h4>




<div class="description">
    <p>A one-octet version number.  The current versions are 3 and 6.</p>
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="https://github.com/openpgpjs/openpgpjs/blob/v6.2.2/src/packet/one_pass_signature.js">packet/one_pass_signature.js</a>, <a href="https://github.com/openpgpjs/openpgpjs/blob/v6.2.2/src/packet/one_pass_signature.js#L58">line 58</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
    

    
        <h3 class="subsection-title">Methods</h3>

        
            

    

    
    <h4 class="name" id="read"><span class="type-signature"></span>read<span class="signature">(bytes)</span><span class="type-signature"> &rarr; {<a href="OnePassSignaturePacket.html">OnePassSignaturePacket</a>}</span></h4>
    

    



<div class="description">
    <p>parsing function for a one-pass signature packet (tag 4).</p>
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>bytes</code></td>
            

            <td class="type">
            
                
<span class="param-type">Uint8Array</span>


            
            </td>

            

            

            <td class="description last"><p>Payload of a tag 4 packet</p></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="https://github.com/openpgpjs/openpgpjs/blob/v6.2.2/src/packet/one_pass_signature.js">packet/one_pass_signature.js</a>, <a href="https://github.com/openpgpjs/openpgpjs/blob/v6.2.2/src/packet/one_pass_signature.js#L98">line 98</a>
    </li></ul></dd>
    

    

    

    
</dl>















<h5>Returns:</h5>

        
<div class="param-desc">
    <p>Object representation.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="OnePassSignaturePacket.html">OnePassSignaturePacket</a></span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="write"><span class="type-signature"></span>write<span class="signature">()</span><span class="type-signature"> &rarr; {Uint8Array}</span></h4>
    

    



<div class="description">
    <p>creates a string representation of a one-pass signature packet</p>
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="https://github.com/openpgpjs/openpgpjs/blob/v6.2.2/src/packet/one_pass_signature.js">packet/one_pass_signature.js</a>, <a href="https://github.com/openpgpjs/openpgpjs/blob/v6.2.2/src/packet/one_pass_signature.js#L153">line 153</a>
    </li></ul></dd>
    

    

    

    
</dl>















<h5>Returns:</h5>

        
<div class="param-desc">
    <p>A Uint8Array representation of a one-pass signature packet.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Uint8Array</span>


    </dd>
</dl>

    





        
    

    

    
</article>

</section>




</div>

<nav>
    <h2><a href="index.html">Home</a></h2><h3>Functions</h3><ul><li><a href="global.html#armor">armor</a></li><li><a href="global.html#createCleartextMessage">createCleartextMessage</a></li><li><a href="global.html#createMessage">createMessage</a></li><li><a href="global.html#decrypt">decrypt</a></li><li><a href="global.html#decryptKey">decryptKey</a></li><li><a href="global.html#decryptSessionKeys">decryptSessionKeys</a></li><li><a href="global.html#encrypt">encrypt</a></li><li><a href="global.html#encryptKey">encryptKey</a></li><li><a href="global.html#encryptSessionKey">encryptSessionKey</a></li><li><a href="global.html#generateKey">generateKey</a></li><li><a href="global.html#generateSessionKey">generateSessionKey</a></li><li><a href="global.html#readCleartextMessage">readCleartextMessage</a></li><li><a href="global.html#readMessage">readMessage</a></li><li><a href="global.html#readSignature">readSignature</a></li><li><a href="global.html#reformatKey">reformatKey</a></li><li><a href="global.html#revokeKey">revokeKey</a></li><li><a href="global.html#sign">sign</a></li><li><a href="global.html#unarmor">unarmor</a></li><li><a href="global.html#verify">verify</a></li></ul><h3>Modules</h3><ul><li><a href="module-config.html">config</a></li><li><a href="module-enums.html">enums</a></li></ul><h3>Classes</h3><ul><li><a href="AEADEncryptedDataPacket.html">AEADEncryptedDataPacket</a></li><li><a href="CleartextMessage.html">CleartextMessage</a></li><li><a href="CompressedDataPacket.html">CompressedDataPacket</a></li><li><a href="Key.html">Key</a></li><li><a href="LiteralDataPacket.html">LiteralDataPacket</a></li><li><a href="MarkerPacket.html">MarkerPacket</a></li><li><a href="Message.html">Message</a></li><li><a href="OnePassSignaturePacket.html">OnePassSignaturePacket</a></li><li><a href="PacketList.html">PacketList</a></li><li><a href="PaddingPacket.html">PaddingPacket</a></li><li><a href="PrivateKey.html">PrivateKey</a></li><li><a href="PublicKey.html">PublicKey</a></li><li><a href="PublicKeyEncryptedSessionKeyPacket.html">PublicKeyEncryptedSessionKeyPacket</a></li><li><a href="PublicKeyPacket.html">PublicKeyPacket</a></li><li><a href="PublicSubkeyPacket.html">PublicSubkeyPacket</a></li><li><a href="SecretKeyPacket.html">SecretKeyPacket</a></li><li><a href="SecretSubkeyPacket.html">SecretSubkeyPacket</a></li><li><a href="Signature.html">Signature</a></li><li><a href="SignaturePacket.html">SignaturePacket</a></li><li><a href="SymEncryptedIntegrityProtectedDataPacket.html">SymEncryptedIntegrityProtectedDataPacket</a></li><li><a href="SymEncryptedSessionKeyPacket.html">SymEncryptedSessionKeyPacket</a></li><li><a href="SymmetricallyEncryptedDataPacket.html">SymmetricallyEncryptedDataPacket</a></li><li><a href="TrustPacket.html">TrustPacket</a></li><li><a href="UserAttributePacket.html">UserAttributePacket</a></li><li><a href="UserIDPacket.html">UserIDPacket</a></li><li><a href="module-key_Subkey-Subkey.html">Subkey</a></li><li><a href="module-key_User-User.html">User</a></li></ul>
</nav>

<br class="clear">

<footer>
    Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.4</a>
</footer>

<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>